home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Interactive Media Design Review 1999
/
Interactive Media Design Review 1999.iso
/
pc
/
Demos
/
Bombardier_PC
/
DATACH.CST
/
00056_Script_calc fields
< prev
next >
Wrap
Text File
|
1999-03-07
|
2KB
|
52 lines
on exitFrame
global default_fuel, default_labor
set d_f = losemoney(the text of field "defaultfuel")
-- if integerp(d_f) or floatp(d_f) then
if value(d_f) > 1000000 then
getocdefaults
set d_f = losemoney(the text of field "defaultfuel")
end if
if value(d_f) < 0 then
getocdefaults
set d_f = losemoney(the text of field "defaultfuel")
end if
if default_fuel <> value(d_f) then
set the text of field "defaultfuel" = "$ " & d_f
set the selstart to length(the text of field "defaultfuel")
set default_fuel = value(d_f)
mainbars
set lx = length(the text of field "displane")
if (lx > 2) and (the text of field "displane"<>"No Competitor") then
compbars the text of field "displane"
end if
end if
-- else
-- alert("enter a number for fuel")
-- set the text of field "defaultfuel" = "0"
-- end if
set d_l = losemoney(the text of field "defaultlabor")
if value(d_l) > 10000000 then
getocdefaults
set d_l = losemoney(the text of field "defaultlabor")
end if
-- if integerp(d_l) or floatp(d_l) then
if default_labor <> value(d_l) then
set the text of field "defaultlabor" = "$ " & d_l
set the selstart to length(the text of field "defaultlabor")
set default_labor = value(d_l)
mainbars
if the number of chars in the text of field "displane" > 2 then
compbars (the text of field "displane")
end if
end if
-- else
-- alert("enter a number for labor")
-- set the text of field "defaultlabor" = "0"
-- end if
repeat with i = 34 to 38.
puppetsprite i, false
set the visible of sprite i = true
end repeat
updatestage
go to the frame
end